From 10c606b1feb6a56a70d76e69c1fc45fa23d0740b Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Thu, 13 Oct 2005 16:02:35 -0600 Subject: [PATCH] Modify printfs to be able to compile on ia64. Width arguments of printf ("%*") should be an int. --- tools/libxc/xc_ia64_stubs.c | 19 ++++++++----------- tools/xenstore/xs_tdb_dump.c | 6 +++--- tools/xenstore/xsls.c | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/tools/libxc/xc_ia64_stubs.c b/tools/libxc/xc_ia64_stubs.c index 84e53b95fc..b67f83b26b 100644 --- a/tools/libxc/xc_ia64_stubs.c +++ b/tools/libxc/xc_ia64_stubs.c @@ -17,17 +17,14 @@ int xc_linux_restore(int xc_handle, int io_fd, u32 dom, unsigned long nr_pfns, } int xc_vmx_build(int xc_handle, - u32 domid, - int memsize, - const char *image_name, - struct mem_map *mem_mapp, - const char *ramdisk_name, - const char *cmdline, - unsigned int control_evtchn, - unsigned long flags, - unsigned int vcpus, - unsigned int store_evtchn, - unsigned long *store_mfn) + uint32_t domid, + int memsize, + const char *image_name, + unsigned int control_evtchn, + unsigned long flags, + unsigned int vcpus, + unsigned int store_evtchn, + unsigned long *store_mfn) { PERROR("xc_vmx_build not implemented\n"); return -1; diff --git a/tools/xenstore/xs_tdb_dump.c b/tools/xenstore/xs_tdb_dump.c index a68f19fc2b..f7e54fbe75 100644 --- a/tools/xenstore/xs_tdb_dump.c +++ b/tools/xenstore/xs_tdb_dump.c @@ -53,17 +53,17 @@ int main(int argc, char *argv[]) hdr = (void *)data.dptr; if (data.dsize < sizeof(*hdr)) fprintf(stderr, "%.*s: BAD truncated\n", - key.dsize, key.dptr); + (int)key.dsize, key.dptr); else if (data.dsize != total_size(hdr)) fprintf(stderr, "%.*s: BAD length %i for %i/%i/%i (%i)\n", - key.dsize, key.dptr, data.dsize, + (int)key.dsize, key.dptr, (int)data.dsize, hdr->num_perms, hdr->datalen, hdr->childlen, total_size(hdr)); else { unsigned int i; char *p; - printf("%.*s: ", key.dsize, key.dptr); + printf("%.*s: ", (int)key.dsize, key.dptr); for (i = 0; i < hdr->num_perms; i++) printf("%s%c%i", i == 0 ? "" : ",", diff --git a/tools/xenstore/xsls.c b/tools/xenstore/xsls.c index f8cf24536a..6cfcbc1d11 100644 --- a/tools/xenstore/xsls.c +++ b/tools/xenstore/xsls.c @@ -25,7 +25,7 @@ void print_dir(struct xs_handle *h, char *path, int cur_depth) if (val == NULL) printf(":\n"); else if ((unsigned)len > (151 - strlen(e[i]))) - printf(" = \"%.*s...\"\n", 148 - strlen(e[i]), val); + printf(" = \"%.*s...\"\n", 148 - (int)strlen(e[i]), val); else printf(" = \"%s\"\n", val); free(val); -- 2.30.2